<template>
  <div class="home">
    <div class="center">
      <HelloWorld></HelloWorld>
      <div class="middle">
        <div class="middle-titel">
          <div class="title-home">中国名酒</div>
          <span>一个世界经典味道的升华</span>
        </div>
      </div>
      <!-- 图片 -->
      <div class="information">
        <ul>
          <li v-for="(item, index) in information" :key="index">
            <div class="information_one">
              <img :src="item.image" alt="Avatar" class="image" width="100%">
              <div class="overlay">
                <div class="text">{{item.text}}</div>
              </div>
            </div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  data() {
    return {
      information: [
        {
          "image" : require('../assets/15.jpg'),
          "text" : '汾酒,是中国清香型白酒的典型代表,工艺精湛，源远流长',
        },
        {
          "image" : require('../assets/14.jpg'),
          "text" : '|密鉴·酒的艺术|,[品味五粮美酒密匙],|密鉴·艺术的酒|',
        },
        {
          "image" : require('../assets/13.jpg'),
          "text" : '艺匠心工艺 ,用“制药的标准酿酒”，采用新升级的数字提前技术酿造。',
        },
        {
          "image" : require('../assets/17.jpg'),
          "text" : ' 经久生香，培养了抱坛醉香气馥郁、优雅爽净、酒体醇厚的卓尔不凡个性品质！',
        },
        {
          "image" : require('../assets/18.jpg'),
          "text" : '依托泸州得天独厚的地理气候条件，采用矿物质丰富的长、沱二江之水，加上传统的酿造工艺， 结合现代化的微生物发酵技术.',
        },
        {
          "image" : require('../assets/16.jpg'),
          "text" : '创造出“醇厚、甜润、回味、柔和”四大风韵，并将喝酒时的元素、状态等注入产品，更加符合现代人健康饮酒、尽兴酣畅的特点。',
        },
      ]
    }
  },
  components: {
    HelloWorld,
  }
}
</script>

<style>
  .home {
    background-color: #d7d9d5;
    padding-bottom: 30px;
  }
  .center {
    margin: 0 auto;
    background-color: #d7d9d5;
    max-width: 2100px;
    margin-bottom: 0;
    border-radius: 0px;
    margin-top: 0;
  }
  .middle {
    padding: 10px 0;
    max-width: 100%;
    margin: 0 auto;
  }
  .middle-titel {
    padding-top: 50px;  
    height: 200px;
    color: black;
    font-size: 1.5rem;
    background: url(../assets/12.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position: 0 0%;
  }
  .title-home {
    font-size: 3rem;
    padding: 10px;
  }

  .information {
    max-width: 100%;
    margin: 0 auto;
    height: auto;
    display: flex;
  }
  .information li{
    list-style: none;
  }
  .information_one{
    position: relative;
    /* width: 100%; */
    padding: 10px;
    float: left;
  }

  .image {
    opacity: 1;
    display: block;
    width: 100%;
    height: auto;
    transition: .5s ease;
    backface-visibility: hidden;
  }

  .overlay {
    transition: .5s ease;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%)
  }
  
  .information_one:hover .image {
    opacity: 0.3;
  }

  .information_one:hover .overlay {
    opacity: 1;
  }

  .text {
    color: black;
    font-size: 16px;
    padding: 16px 32px;
  }
/* 窗口小于1800px */
  @media only screen and (max-width: 1800px) {
    
  }
/* 窗口小于1024px */
  @media only screen and (max-width: 1024px) {
    .overlay {
      width: 100%;
      padding: 10px;
    }
    .text {
      font-size: 1.5rem;
      font-weight: 500;
    }
  }
/* 窗口小于768px */
  @media only screen and (max-width: 800px) {
    .center {
      max-width: 100%;
    }
    .middle {
    padding: 5px 0;
    }
    .middle-titel {
      padding-top: 30px;  
      color: black;
      font-size: 2.5rem;
      font-weight: 700;
    }
    .title-home {
      font-weight: 900;
      font-size: 3.5rem;
      padding: 0;
    }
    .information_one {
      width: 600px;
    }
    .overlay {
      width: 100%;
      padding: 10px;
    }
    .text {
      font-size: 2.2rem;
      font-weight: 500;
    }
  }
/* 窗口小于480 */
  @media only screen and (max-width: 480px) {
    .title-home {
      font-size: 2.5rem;
      font-weight: 900;
    }
    .information {
    max-width: 100%;
    margin: 0;
    padding: 0;
    height: auto;
    float: none;
    }
    .information_one,.information_tow,.information_therr {
      margin: 0;
      padding: 10px;
      float: left;
      width: 100%;
    }
  }
</style>